********************************************************************************************
**** GROUP COMPARISON AT BASELINE AND FOLLOW-UP
**** This file generates output tables for group comparison at baseline.
**** Version: 10/03/2014
********************************************************************************************
				
********************************************************************************************
**** HOUSEHOLD LEVEL VARIABLES
********************************************************************************************

	* EXPENDITURES

		* Create table for mean differences between treatment status for different data collection waves
						
			treattest $Expenditure_shares_var
				
				esttab  using "Outputs/Expenditure shares at baseline and follow-up.tex", f replace compress noobs nonumb nomtitles width(1\textwidth) gaps ///
				cells("m_mu_1_b(fmt(3)) m_mu_2_b(fmt(3)) m_coef_c_b(fmt(3) star pvalue(m_d_p_c_b)) cm_coef_c_b(fmt(3) star pvalue(cm_d_p_c_b)) m_mu_1_f(fmt(3)) m_mu_2_f(fmt(3)) m_coef_c_f(fmt(3) star pvalue(m_d_p_c_f)) cm_coef_c_f(fmt(3) star pvalue(cm_d_p_c_f)) ivm_coef_c_f(fmt(3) star pvalue(ivm_d_p_c_f))" ///
				"m_sd_1_b(fmt(3) par([ ])) m_sd_2_b(fmt(3) par([ ])) m_d_se_c_b(fmt(3) par) cm_d_se_c_b(fmt(3) par) m_sd_1_f(fmt(3) par([ ])) m_sd_2_f(fmt(3) par([ ])) m_d_se_c_f(fmt(3) par) cm_d_se_c_f(fmt(3) par) ivm_d_se_c_f(fmt(3) par)") label star(* 0.1 ** 0.05 *** 0.01) ///
				stats(N2 N3 N4 N5 N7 N8 N9 N10 N11, layout("@ @ @ @ @ @ @ @ @") labels("Observations") fmt(0)) ///
				collabels("HH" "Mother" "Diff" "Diff" "HH" "Mother" "Diff" "Diff" "Diff IV")

		* Create table for mean differences between treatment status for different data collection waves for FOOD SUBGROUPS
						
			treattest $Expenditure_shares_food
				
				esttab  using "Outputs/Expenditure shares at baseline and follow-up (subgroups, food).tex", f replace compress noobs nonumb nomtitles width(1\textwidth) gaps ///
				cells("m_mu_1_b(fmt(3)) m_mu_2_b(fmt(3)) m_coef_c_b(fmt(3) star pvalue(m_d_p_c_b)) cm_coef_c_b(fmt(3) star pvalue(cm_d_p_c_b)) m_mu_1_f(fmt(3)) m_mu_2_f(fmt(3)) m_coef_c_f(fmt(3) star pvalue(m_d_p_c_f)) cm_coef_c_f(fmt(3) star pvalue(cm_d_p_c_f)) ivm_coef_c_f(fmt(3) star pvalue(ivm_d_p_c_f))" ///
				"m_sd_1_b(fmt(3) par([ ])) m_sd_2_b(fmt(3) par([ ])) m_d_se_c_b(fmt(3) par) cm_d_se_c_b(fmt(3) par) m_sd_1_f(fmt(3) par([ ])) m_sd_2_f(fmt(3) par([ ])) m_d_se_c_f(fmt(3) par) cm_d_se_c_f(fmt(3) par) ivm_d_se_c_f(fmt(3) par)") label star(* 0.1 ** 0.05 *** 0.01) ///				
				stats(N2 N3 N4 N5 N7 N8 N9 N10 N11, layout("@ @ @ @ @ @ @ @ @") labels("Observations") fmt(0)) ///
				collabels("HH" "Mother" "Diff" "Diff" "HH" "Mother" "Diff" "Diff" "Diff IV")
				
			treattest $Expenditure_subshares_food
				
				esttab  using "Outputs/Food shares at baseline and follow-up (subgroups, food).tex", f replace compress noobs nonumb nomtitles width(1\textwidth) gaps ///
				cells("m_mu_1_b(fmt(3)) m_mu_2_b(fmt(3)) m_coef_c_b(fmt(3) star pvalue(m_d_p_c_b)) cm_coef_c_b(fmt(3) star pvalue(cm_d_p_c_b)) m_mu_1_f(fmt(3)) m_mu_2_f(fmt(3)) m_coef_c_f(fmt(3) star pvalue(m_d_p_c_f)) cm_coef_c_f(fmt(3) star pvalue(cm_d_p_c_f)) ivm_coef_c_f(fmt(3) star pvalue(ivm_d_p_c_f))" ///
				"m_sd_1_b(fmt(3) par([ ])) m_sd_2_b(fmt(3) par([ ])) m_d_se_c_b(fmt(3) par) cm_d_se_c_b(fmt(3) par) m_sd_1_f(fmt(3) par([ ])) m_sd_2_f(fmt(3) par([ ])) m_d_se_c_f(fmt(3) par) cm_d_se_c_f(fmt(3) par) ivm_d_se_c_f(fmt(3) par)") label star(* 0.1 ** 0.05 *** 0.01) ///				
				stats(N2 N3 N4 N5 N7 N8 N9 N10 N11, layout("@ @ @ @ @ @ @ @ @") labels("Observations") fmt(0)) ///
				collabels("HH" "Mother" "Diff" "Diff" "HH" "Mother" "Diff" "Diff" "Diff IV")

		* Create table for mean differences between treatment status for different data collection waves for OTHER SUBGROUPS
						
			treattest $Expenditure_shares_sub
				
				esttab  using "Outputs/Expenditure shares at baseline and follow-up (subgroups, other).tex", f replace compress noobs nonumb nomtitles width(1\textwidth) gaps ///
				cells("m_mu_1_b(fmt(3)) m_mu_2_b(fmt(3)) m_coef_c_b(fmt(3) star pvalue(m_d_p_c_b)) cm_coef_c_b(fmt(3) star pvalue(cm_d_p_c_b)) m_mu_1_f(fmt(3)) m_mu_2_f(fmt(3)) m_coef_c_f(fmt(3) star pvalue(m_d_p_c_f)) cm_coef_c_f(fmt(3) star pvalue(cm_d_p_c_f)) ivm_coef_c_f(fmt(3) star pvalue(ivm_d_p_c_f))" ///
				"m_sd_1_b(fmt(3) par([ ])) m_sd_2_b(fmt(3) par([ ])) m_d_se_c_b(fmt(3) par) cm_d_se_c_b(fmt(3) par) m_sd_1_f(fmt(3) par([ ])) m_sd_2_f(fmt(3) par([ ])) m_d_se_c_f(fmt(3) par) cm_d_se_c_f(fmt(3) par) ivm_d_se_c_f(fmt(3) par)") label star(* 0.1 ** 0.05 *** 0.01) ///				
				stats(N2 N3 N4 N5 N7 N8 N9 N10 N11, layout("@ @ @ @ @ @ @ @ @") labels("Observations") fmt(0)) ///
				collabels("HH" "Mother" "Diff" "Diff" "HH" "Mother" "Diff" "Diff" "Diff IV")

/* 
		
	* CONSUMPTION
		
		* Create table for mean differences between treatment status for different data collection waves
		
			treattest $Cons_shares_var
			
				esttab  using "Outputs/Consumption shares at baseline and follow-up.tex", f replace compress noobs nonumb nomtitles width(1\textwidth) gaps ///
				cells("m_mu_1_b(fmt(3)) m_mu_2_b(fmt(3)) m_coef_c_b(fmt(3) star pvalue(m_d_p_c_b)) m_mu_1_f(fmt(3)) m_mu_2_f(fmt(3)) m_coef_c_f(fmt(3) star pvalue(m_d_p_c_f)) cm_coef_c_f(fmt(3) star pvalue(cm_d_p_c_f)) ivm_coef_c_f(fmt(3) star pvalue(ivm_d_p_c_f))" ///
				"m_sd_1_b(fmt(3) par([ ])) m_sd_2_b(fmt(3) par([ ])) m_d_se_c_b(fmt(3) par) m_sd_1_f(fmt(3) par([ ])) m_sd_2_f(fmt(3) par([ ])) m_d_se_c_f(fmt(3) par) cm_d_se_c_f(fmt(3) par) ivm_d_se_c_f(fmt(3) par)") label star(* 0.1 ** 0.05 *** 0.01) ///
				stats(N2 N3 N4 N6 N7 N8 N9 N10, layout("@ @ @ @ @ @ @ @") labels("Observations") fmt(0)) ///
				collabels("HH" "Mother" "Diff" "HH" "Mother" "Diff" "Diff" "Diff IV")
				
		* Create table for mean differences between treatment status for different data collection waves for FOOD SUBGROUPS
			
			treattest $Cons_shares_food
			
				esttab  using "Outputs/Consumption shares at baseline and follow-up (subgroups, food).tex", f replace compress noobs nonumb nomtitles width(1\textwidth) gaps ///
				cells("m_mu_1_b(fmt(3)) m_mu_2_b(fmt(3)) m_coef_c_b(fmt(3) star pvalue(m_d_p_c_b)) m_mu_1_f(fmt(3)) m_mu_2_f(fmt(3)) m_coef_c_f(fmt(3) star pvalue(m_d_p_c_f)) cm_coef_c_f(fmt(3) star pvalue(cm_d_p_c_f)) ivm_coef_c_f(fmt(3) star pvalue(ivm_d_p_c_f))" ///
				"m_sd_1_b(fmt(3) par([ ])) m_sd_2_b(fmt(3) par([ ])) m_d_se_c_b(fmt(3) par) m_sd_1_f(fmt(3) par([ ])) m_sd_2_f(fmt(3) par([ ])) m_d_se_c_f(fmt(3) par) cm_d_se_c_f(fmt(3) par) ivm_d_se_c_f(fmt(3) par)") label star(* 0.1 ** 0.05 *** 0.01) ///
				stats(N2 N3 N4 N6 N7 N8 N9 N10, layout("@ @ @ @ @ @ @ @") labels("Observations") fmt(0)) ///
				collabels("HH" "Mother" "Diff" "HH" "Mother" "Diff" "Diff" "Diff IV")

			treattest $Cons_subshares_food
			
				esttab  using "Outputs/Food consumption shares at baseline and follow-up (subgroups, food).tex", f replace compress noobs nonumb nomtitles width(1\textwidth) gaps ///
				cells("m_mu_1_b(fmt(3)) m_mu_2_b(fmt(3)) m_coef_c_b(fmt(3) star pvalue(m_d_p_c_b)) m_mu_1_f(fmt(3)) m_mu_2_f(fmt(3)) m_coef_c_f(fmt(3) star pvalue(m_d_p_c_f)) cm_coef_c_f(fmt(3) star pvalue(cm_d_p_c_f)) ivm_coef_c_f(fmt(3) star pvalue(ivm_d_p_c_f))" ///
				"m_sd_1_b(fmt(3) par([ ])) m_sd_2_b(fmt(3) par([ ])) m_d_se_c_b(fmt(3) par) m_sd_1_f(fmt(3) par([ ])) m_sd_2_f(fmt(3) par([ ])) m_d_se_c_f(fmt(3) par) cm_d_se_c_f(fmt(3) par) ivm_d_se_c_f(fmt(3) par)") label star(* 0.1 ** 0.05 *** 0.01) ///
				stats(N2 N3 N4 N6 N7 N8 N9 N10, layout("@ @ @ @ @ @ @ @") labels("Observations") fmt(0)) ///
				collabels("HH" "Mother" "Diff" "HH" "Mother" "Diff" "Diff" "Diff IV")
				
			* Create table for mean differences between treatment status for different data collection waves for OTHER SUBGROUPS
			
				treattest $Cons_shares_sub
			
				esttab  using "Outputs/Consumption shares at baseline and follow-up (subgroups, other).tex", f replace compress noobs nonumb nomtitles width(1\textwidth) ///
				cells("m_mu_1_b(fmt(3)) m_mu_2_b(fmt(3)) m_coef_c_b(fmt(3) star pvalue(m_d_p_c_b)) m_mu_1_f(fmt(3)) m_mu_2_f(fmt(3)) m_coef_c_f(fmt(3) star pvalue(m_d_p_c_f)) cm_coef_c_f(fmt(3) star pvalue(cm_d_p_c_f)) ivm_coef_c_f(fmt(3) star pvalue(ivm_d_p_c_f))" ///
				"m_sd_1_b(fmt(3) par([ ])) m_sd_2_b(fmt(3) par([ ])) m_d_se_c_b(fmt(3) par) m_sd_1_f(fmt(3) par([ ])) m_sd_2_f(fmt(3) par([ ])) m_d_se_c_f(fmt(3) par) cm_d_se_c_f(fmt(3) par) ivm_d_se_c_f(fmt(3) par)") label star(* 0.1 ** 0.05 *** 0.01) ///
				stats(N2 N3 N4 N6 N7 N8 N9 N10, layout("@ @ @ @ @ @ @ @") labels("Observations") fmt(0)) ///
				collabels("HH" "Mother" "Diff" "HH" "Mother" "Diff" "Diff" "Diff IV")
		
	* CONSUMPTION DECOMPOSITION

		* Create table for mean differences between treatment status for different data collection waves for PURCHASES
		
			treattest $Cons_shares_var_pur
			
				esttab  using "Outputs/Consumption shares at baseline and follow-up (Purchases).tex", f replace compress noobs nonumb nomtitles width(1\textwidth) ///
				cells("m_mu_1_b(fmt(3)) m_mu_2_b(fmt(3)) m_coef_c_b(fmt(3) star pvalue(m_d_p_c_b)) m_mu_1_f(fmt(3)) m_mu_2_f(fmt(3)) m_coef_c_f(fmt(3) star pvalue(m_d_p_c_f))" ///
				"m_sd_1_b(fmt(3) par([ ])) m_sd_2_b(fmt(3) par([ ])) m_d_se_c_b(fmt(3) par) m_sd_1_f(fmt(3) par([ ])) m_sd_2_f(fmt(3) par([ ])) m_d_se_c_f(fmt(3) par)") label star(* 0.1 ** 0.05 *** 0.01) ///
				stats(N2 N3 N4 N6 N7 N8, layout("@ @ @ @ @ @") labels("Observations") fmt(0)) ///
				mgroups("\multicolumn{3}{c}{\textit{Baseline}} & \multicolumn{3}{c}{\textit{Follow-up}}",  pattern(1 0 0 1 0 0) span) ///
				collabels("HH" "Mother" "Diff" "HH" "Mother" "Diff") ///
				ti("Consumption and consumption shares from PURCHASES by treatment status\label{ConsPurAll}") ///
				addn("\begin{minipage}[t]{0.9\textwidth}{\smaller Standard deviations in brackets, standard errors in parenthesis. \sym{***} denotes significance at 1\%, \sym{**} at 5\%, and \sym{*} at 10\%. The standard errors on the differences are estimated from running the corresponding least squares regression on treatment status allowing for the errors to be clustered at municipality level. Treatment status is equal to 1 if the transfer is made to mothers and zero otherwise. Consumption shares are defined as the ratio beetween the consumption deriving from a specific source and the total household consumption.} \end{minipage}")

		* Create table for mean differences between treatment status for different data collection waves for SELF PRODUCTION
		
			treattest $Cons_shares_var_sf
			
				esttab  using "Outputs/Consumption shares at baseline and follow-up (Self production).tex", f replace compress noobs nonumb nomtitles width(1\textwidth) ///
				cells("m_mu_1_b(fmt(3)) m_mu_2_b(fmt(3)) m_coef_c_b(fmt(3) star pvalue(m_d_p_c_b)) m_mu_1_f(fmt(3)) m_mu_2_f(fmt(3)) m_coef_c_f(fmt(3) star pvalue(m_d_p_c_f))" ///
				"m_sd_1_b(fmt(3) par([ ])) m_sd_2_b(fmt(3) par([ ])) m_d_se_c_b(fmt(3) par) m_sd_1_f(fmt(3) par([ ])) m_sd_2_f(fmt(3) par([ ])) m_d_se_c_f(fmt(3) par)") label star(* 0.1 ** 0.05 *** 0.01) ///
				stats(N2 N3 N4 N6 N7 N8, layout("@ @ @ @ @ @") labels("Observations") fmt(0)) ///
				mgroups("\multicolumn{3}{c}{\textit{Baseline}} & \multicolumn{3}{c}{\textit{Follow-up}}",  pattern(1 0 0 1 0 0) span) ///
				collabels("HH" "Mother" "Diff" "HH" "Mother" "Diff") ///
				ti("Consumption and consumption shares from SELF-PRODUCTION by treatment status\label{ConsSfAll}") ///
				addn("\begin{minipage}[t]{0.9\textwidth}{\smaller Standard deviations in brackets, standard errors in parenthesis. \sym{***} denotes significance at 1\%, \sym{**} at 5\%, and \sym{*} at 10\%. The standard errors on the differences are estimated from running the corresponding least squares regression on treatment status allowing for the errors to be clustered at municipality level. Treatment status is equal to 1 if the transfer is made to mothers and zero otherwise. Consumption shares are defined as the ratio beetween the consumption deriving from a specific source and the total household consumption.} \end{minipage}")
				
		* Create table for mean differences between treatment status for different data collection waves for STORAGE
		
			treattest $Cons_shares_var_stor
			
				esttab  using "Outputs/Consumption shares at baseline and follow-up (Storage).tex", f replace compress noobs nonumb nomtitles width(1\textwidth) ///
				cells("m_mu_1_b(fmt(3)) m_mu_2_b(fmt(3)) m_coef_c_b(fmt(3) star pvalue(m_d_p_c_b)) m_mu_1_f(fmt(3)) m_mu_2_f(fmt(3)) m_coef_c_f(fmt(3) star pvalue(m_d_p_c_f))" ///
				"m_sd_1_b(fmt(3) par([ ])) m_sd_2_b(fmt(3) par([ ])) m_d_se_c_b(fmt(3) par) m_sd_1_f(fmt(3) par([ ])) m_sd_2_f(fmt(3) par([ ])) m_d_se_c_f(fmt(3) par)") label star(* 0.1 ** 0.05 *** 0.01) ///
				stats(N2 N3 N4 N6 N7 N8, layout("@ @ @ @ @ @") labels("Observations") fmt(0)) ///
				mgroups("\multicolumn{3}{c}{\textit{Baseline}} & \multicolumn{3}{c}{\textit{Follow-up}}",  pattern(1 0 0 1 0 0) span) ///
				collabels("HH" "Mother" "Diff" "HH" "Mother" "Diff") ///
				ti("Consumption and consumption shares from STORAGE by treatment status\label{ConsStorAll}") ///
				addn("\begin{minipage}[t]{0.9\textwidth}{\smaller Standard deviations in brackets, standard errors in parenthesis. \sym{***} denotes significance at 1\%, \sym{**} at 5\%, and \sym{*} at 10\%. The standard errors on the differences are estimated from running the corresponding least squares regression on treatment status allowing for the errors to be clustered at municipality level. Treatment status is equal to 1 if the transfer is made to mothers and zero otherwise. Consumption shares are defined as the ratio beetween the consumption deriving from a specific source and the total household consumption.} \end{minipage}")
				
		* Create table for mean differences between treatment status for different data collection waves for GIFTS
		
			treattest $Cons_shares_var_gift
			
				esttab  using "Outputs/Consumption shares at baseline and follow-up (Gifts).tex", f replace compress noobs nonumb nomtitles width(1\textwidth) ///
				cells("m_mu_1_b(fmt(3)) m_mu_2_b(fmt(3)) m_coef_c_b(fmt(3) star pvalue(m_d_p_c_b)) m_mu_1_f(fmt(3)) m_mu_2_f(fmt(3)) m_coef_c_f(fmt(3) star pvalue(m_d_p_c_f))" ///
				"m_sd_1_b(fmt(3) par([ ])) m_sd_2_b(fmt(3) par([ ])) m_d_se_c_b(fmt(3) par) m_sd_1_f(fmt(3) par([ ])) m_sd_2_f(fmt(3) par([ ])) m_d_se_c_f(fmt(3) par)") label star(* 0.1 ** 0.05 *** 0.01) ///
				stats(N2 N3 N4 N6 N7 N8, layout("@ @ @ @ @ @") labels("Observations") fmt(0)) ///
				mgroups("\multicolumn{3}{c}{\textit{Baseline}} & \multicolumn{3}{c}{\textit{Follow-up}}",  pattern(1 0 0 1 0 0) span) ///
				collabels("HH" "Mother" "Diff" "HH" "Mother" "Diff") ///
				ti("Consumption and consumption shares from GIFTS by treatment status\label{ConsGiftsAll}") ///
				addn("\begin{minipage}[t]{0.9\textwidth}{\smaller Standard deviations in brackets, standard errors in parenthesis. \sym{***} denotes significance at 1\%, \sym{**} at 5\%, and \sym{*} at 10\%. The standard errors on the differences are estimated from running the corresponding least squares regression on treatment status allowing for the errors to be clustered at municipality level. Treatment status is equal to 1 if the transfer is made to mothers and zero otherwise. Consumption shares are defined as the ratio beetween the consumption deriving from a specific source and the total household consumption.} \end{minipage}")

*/
